package com.xrtn.mapper;

import com.xrtn.bean.TPatientTreatment;

import java.util.List;
import java.util.Map;

public interface TPatientTreatmentMapper {
    int deleteByPrimaryKey(Integer treatmentId);

    int insert(TPatientTreatment record);

    int insertSelective(TPatientTreatment record);

    TPatientTreatment selectByPrimaryKey(Integer treatmentId);

    TPatientTreatment selectByBookingIdAndPatientId(Map<String,Object> params);

    TPatientTreatment selectByMap(Map<String,Object> params);

    List<TPatientTreatment> selectByUserId(Map<String,Object> params);

    List<TPatientTreatment> selectByPatientId(Map<String,Object> params);

    /**
     * 查询过期病历
     * @return
     */
    List<TPatientTreatment> selectOverTreatment(Map<String,Object> params);

    /**
     * 导出，查询病例信息
     * @param params
     * @return
     */
    List<Map<String,Object>> selectTreatmentList(Map<String,Object> params);

    /**
     * @param params
     * @return
     */
    TPatientTreatment selectByPatientIdAndBookingId(Map<String,Object> params);

    /**
     * 后台病例看板
     * @param params
     * @return
     */
    List<Map<String,Object>> selectDiseaseBook(Map<String, Object> params);

    /**
     * 后台统计时间段内病历总数
     * @param params
     * @return
     */
    Integer selectTreatmentCount(Map<String, Object> params);

    List<Map<String,Object>> selectHistoryTreatmentList(Integer patientId);

    int updateByPrimaryKeySelective(TPatientTreatment record);

    int updateByPrimaryKey(TPatientTreatment record);

    List<Map<String,Object>> selectSameBookingTreatmentList();

    List<TPatientTreatment> selectByBookingId(Map<String, Object> params);

    int updateByTreatmentId(Map<String, Object> params);

    Map<String,Object> selectByTreatmentId(Integer treatmentId);
}